Optimal. Leaf size=96 \[ -\frac {b \left (a+\frac {b}{x}\right )^{1+p} \left (c+\frac {d}{x}\right )^q \left (\frac {b \left (c+\frac {d}{x}\right )}{b c-a d}\right )^{-q} F_1\left (1+p;-q,2;2+p;-\frac {d \left (a+\frac {b}{x}\right )}{b c-a d},\frac {a+\frac {b}{x}}{a}\right )}{a^2 (1+p)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {382, 142, 141}
\begin {gather*} -\frac {b \left (a+\frac {b}{x}\right )^{p+1} \left (c+\frac {d}{x}\right )^q \left (\frac {b \left (c+\frac {d}{x}\right )}{b c-a d}\right )^{-q} F_1\left (p+1;-q,2;p+2;-\frac {d \left (a+\frac {b}{x}\right )}{b c-a d},\frac {a+\frac {b}{x}}{a}\right )}{a^2 (p+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 141
Rule 142
Rule 382
Rubi steps
\begin {align*} \int \left (a+\frac {b}{x}\right )^p \left (c+\frac {d}{x}\right )^q \, dx &=-\text {Subst}\left (\int \frac {(a+b x)^p (c+d x)^q}{x^2} \, dx,x,\frac {1}{x}\right )\\ &=-\left (\left (\left (c+\frac {d}{x}\right )^q \left (\frac {b \left (c+\frac {d}{x}\right )}{b c-a d}\right )^{-q}\right ) \text {Subst}\left (\int \frac {(a+b x)^p \left (\frac {b c}{b c-a d}+\frac {b d x}{b c-a d}\right )^q}{x^2} \, dx,x,\frac {1}{x}\right )\right )\\ &=-\frac {b \left (a+\frac {b}{x}\right )^{1+p} \left (c+\frac {d}{x}\right )^q \left (\frac {b \left (c+\frac {d}{x}\right )}{b c-a d}\right )^{-q} F_1\left (1+p;-q,2;2+p;-\frac {d \left (a+\frac {b}{x}\right )}{b c-a d},\frac {a+\frac {b}{x}}{a}\right )}{a^2 (1+p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(206\) vs. \(2(96)=192\).
time = 0.30, size = 206, normalized size = 2.15 \begin {gather*} \frac {b d (-2+p+q) \left (a+\frac {b}{x}\right )^p \left (c+\frac {d}{x}\right )^q x F_1\left (1-p-q;-p,-q;2-p-q;-\frac {a x}{b},-\frac {c x}{d}\right )}{(-1+p+q) \left (-b d (-2+p+q) F_1\left (1-p-q;-p,-q;2-p-q;-\frac {a x}{b},-\frac {c x}{d}\right )+x \left (a d p F_1\left (2-p-q;1-p,-q;3-p-q;-\frac {a x}{b},-\frac {c x}{d}\right )+b c q F_1\left (2-p-q;-p,1-q;3-p-q;-\frac {a x}{b},-\frac {c x}{d}\right )\right )\right )} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.04, size = 0, normalized size = 0.00 \[\int \left (a +\frac {b}{x}\right )^{p} \left (c +\frac {d}{x}\right )^{q}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + \frac {b}{x}\right )^{p} \left (c + \frac {d}{x}\right )^{q}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (a+\frac {b}{x}\right )}^p\,{\left (c+\frac {d}{x}\right )}^q \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________